how to check key is available in object or not